export default {
  name: "elSelectLoadMore",
  bind(el, binding) {
    // el-select容器盒子dom
    const elSelectWrapDom = el.querySelector(
      ".el-select-dropdown .el-select-dropdown__wrap"
    );
    // 监听滚动事件
    elSelectWrapDom.addEventListener("scroll", function () {
      // 元素滚动到底触发
      const condition =
        this.scrollHeight - Math.ceil(this.scrollTop) <= this.clientHeight;
      if (condition) {
        binding.value();
      }
    });
  }
};
